package com.hxd.controller;

import static com.hxd.common.Result.success;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hxd.base.BaseController;
import com.hxd.common.Result;
import com.hxd.entity.SysRole;
import com.hxd.pojo.SysRoleVO;
import com.hxd.service.SysRoleService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
    * 角色信息表 前端控制器
    * </p>
 *
 * @author zhoujw
 * @since 2019-12-25
 * @version v1.0
 */
@Api(tags="角色信息表")
@RestController
@RequestMapping("/sys-role")
public class SysRoleController extends BaseController<SysRole, SysRoleVO> {
	
	@Autowired
	private SysRoleService sysRoleService;

	@PostMapping("/tx-save")
	@ApiOperation(value = "事务测试-保存数据")
	public Result txSave(@RequestBody SysRole entity) {
		sysRoleService.txSave(entity);
		return success();
	}
}
